package com.mebs.model;

import org.jt.jet.content.JetNamedObject;
import com.mebs.model.service.accommodation.AccommodationStatus;
import com.mebs.model.service.commercial.CommercialStatus;
import com.mebs.model.service.vehicle.VehicleStatus;
import com.mebs.model.service.visa.VisaStatus;
import com.mebs.model.service.procurement.ProcurementStatus;
import com.mebs.model.service.labor.LaborStatus;
import com.mebs.model.logistics.StorageStatus;
import com.mebs.model.logistics.AirStatus;
import com.mebs.model.logistics.OceanStatus;
import com.mebs.model.logistics.TruckStatus;
import com.mebs.model.inventory.OrderStatus;

/**
 * Date: Mar 21, 2006
 * Time: 6:07:40 PM
 *
 * @author Peschuk Ruslan
 */
public enum Status implements JetNamedObject {
    ACCOMMODATION(1, "Accommodation Status", AccommodationStatus.class),
    COMMERCIAL(2, "Commercial Status", CommercialStatus.class),
    STORAGE(3, "Storage Status", StorageStatus.class),
    VEHICLE(4, "Vehicle Status", VehicleStatus.class),
    VISA(5, "Visa Status", VisaStatus.class),
    ORDER(6, "Order Status", OrderStatus.class),
    PROCUREMENT(7, "Procurement Status", ProcurementStatus.class),
    AIR(8, "Air Transportation Status", AirStatus.class),
    OCEAN(9, "Ocean Transportation Status", OceanStatus.class),
    TRUCK(10, "Truck Transportation Status", TruckStatus.class),
    LABOR(11, "Labor Status", LaborStatus.class);

	public final int type;
    public final String name;
    public final Class statusClass;

    Status(int type, String name, Class statusClass)
    {
        this.type = type;
        this.name = name;
        this.statusClass = statusClass;
    }

    public static Status getObjectByType(int type)
    {
        return Status.values()[type - 1];
    }

    public Object getObjectId()
    {
        return type;
    }

    public String getObjectName()
    {
        return name;
    }

    public int getObjectType()
    {
        return type;
    }

    public Class getStatusClass()
    {
        return statusClass;
    }

    public String toString()
    {
        return name;
    }
}